package voldemort.store.cachestore;

import java.io.IOException;
import java.nio.channels.FileChannel;

/**
 * Created by IntelliJ IDEA.
 * User: derek
 * Date: May 15, 2010
 * Time: 12:49:54 PM
 * To change this template use File | Settings | File Templates.
 */
public interface BlockOps <T> {
    // persist a new block
    public void writeNewBlock(CacheBlock<T> block, long keyoffset2Len, byte[] key) throws IOException ;
    // update a existing block
    public void writeExistBlock(CacheBlock<T> block) throws IOException;
    public void removeBlock(CacheBlock<T> block) throws IOException ;
    public void close();
    public byte[] readChannel(long offset2len, FileChannel cahnnel) throws IOException; 
}
